package com.gzsxy.esjy.sign.dto;

import com.alibaba.fastjson.JSONObject;
import com.gzsxy.esjy.sign.SignConstant;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author zhangxiaolong
 * @since 2022/7/15
 */
@Getter
@Setter
public class ScreenSignProtocolDtoDto extends BaseSignProtocolDto implements Serializable {

    private static final long serialVersionUID = 5259619419782516185L;

    /**
     * 版本号
     */
    private Double version = 1.0;

    /**
     * 会话ID
     */
    private Long sessionID = 10010L;

    /**
     * 消息命令
     */
    private String command = "";

    /**
     * 消息类型（request/response）
     */
    private String type;

    /**
     * 模块名称（inquest/video/sign）
     */
    private String module = "";

    /**
     * 消息体发送请求参数
     */
    private ScreenSignParamDto parameters;

    /**
     * 消息体收到回复内容
     */
    private JSONObject result;

    public ScreenSignProtocolDtoDto() {
        super();
    }

    public ScreenSignProtocolDtoDto(ScreenSignParamDto parameters, String command) {
        super();
        this.parameters = parameters;
        this.module = SignConstant.SIGN_CMD;
        this.type = "request";
        this.command = command;
    }

    public ScreenSignProtocolDtoDto(double version, long sessionId, String command, String type, String module) {
        this.version = version;
        this.sessionID = sessionId;
        this.command = command;
        this.type = type;
        this.module = module;
    }
}
